import React, { Component } from 'react'
import TodoItem from '../../component/TodoItem'
import connect from './connect'
import {ITodo} from '../../store/types'
type IProps = {
    todos: Array<ITodo>
}
class VisiableList extends Component<IProps> {
    render() {
        return (
            <ul>
                {
                    this.props.todos.map((item)=>{
                        return <TodoItem key={item.id} {...item}></TodoItem>
                    })
                }
            </ul>
        )
    }
}


export default connect(VisiableList)
